#ifndef QFORMWIDGETVIEW_H
#define QFORMWIDGETVIEW_H

#include <QWidget>
#include <QComboBox>

class QFormListWidget;

namespace CORELIB
{
    class StyledBar;
}

namespace SHAREDLIB
{
    class QPageInfo;
}

class QFormWidgetView : public QWidget
{
    Q_OBJECT
public:
    explicit QFormWidgetView(QWidget *parent = 0);

    void    showForm(SHAREDLIB::QPageInfo *info);

    void    make_page_position(QVariant &info);
    void    set_page_position(const QVariant &info);
    bool    page_position(const QVariant &info);
signals:
    void    selectWidget(QWidget* wid);
    void    showFormSignal(QWidget* form);
    void    formAddSignal(QWidget* wid);
    void    addWidgetSignal(QWidget* wid,int);
    void    widgetRemove(QWidget* wid);
    void    clear_object_list();
    void    need_make_page_position();
public slots:
    void    widgetSelect(QWidget* wid);
protected slots:
    void    projectOpen();
    void    projectClosed();
    void    currentFormChanged();
    void    languageChanged();
    void    languageSelectChanged(const QString &name);
    void    refreshLanguage();
    void    refreshForm();

    void    add();
    void    remove();

    void    left();
    void    h_center();
    void    right();
    void    top();
    void    v_center();
    void    bottom();

    void    sameWidth();
    void    sameHeight();
    void    sameGemotry();
protected:

    QFormListWidget     *m_formWidget;
    CORELIB::StyledBar  *m_styledBar;
    QComboBox           *m_languageComboBox;
};

#endif // QFORMWIDGETVIEW_H
